//
//  NSDate+Compare.m
//
//  Created by zhaol on 10/14/15.
//  Copyright © 2015 zify. All rights reserved.
//

#import "NSDate+Compare.h"
#import "NSDateComponents+Compare.h"

@implementation NSDate(Compare)

- (BOOL)isSameDay:(NSDate*)date
{
    NSDateComponents *dateComps = [NSDateComponents componentsWithDate:date];
    NSDateComponents *selfComps = [NSDateComponents componentsWithDate:self];
    
    if ([selfComps isSameDay:dateComps]) {
        return YES;
    }
    return NO;
}
@end
